package cn.wolfcode.trip.base.service.impl;

import cn.wolfcode.trip.base.domain.ProductContent;
import cn.wolfcode.trip.base.mapper.ProductContentMapper;
import cn.wolfcode.trip.base.service.IProductContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/** tiger
 * 商品详情
 */
@Service
public class ProductContentServiceImpl implements IProductContentService {
    @Autowired
    private ProductContentMapper productContentMapper;

    /**
     * 查询全部详情
     * @return
     */
    public List<ProductContent> ListAll() {
        return productContentMapper.selectAll();
    }

    /**
     * 根据商品id查询详情
     * @param id
     * @return
     */
    public ProductContent getProductContentById(Long id) {
        return productContentMapper.selectByPrimaryKey(id);
    }
}
